package br.com.casadocodigo.boaviagem;

import br.com.casadocodigo.boaviagem.R.id;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;

public class ViagemActivity extends Activity {
	
	public void selecionarOpcao(View view){
		switch (view.getId()){
		case R.id.nova_viagem:
			startActivity(new Intent(this, ViagemActivity.class));
			break;
		}
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// TODO Auto-generated method stub
		
		MenuInflater inflater = getMenuInflater();
		inflater.inflate(R.menu.viagem_menu, menu);
		return true;
	}
	
	@Override
	public boolean onMenuItemSelected(int featureId, MenuItem item) {
		// TODO Auto-generated method stub
		
		switch (item.getItemId()){
		case R.id.novo_gasto:
			startActivity(new Intent(this, GastoActivity.class));
			return true;
		case R.id.remover:
			//startActivity(new Intent(this, ))
			return true;
		default:
			return super.onMenuItemSelected(featureId, item);
		}
	}
}
